package com.leapp;

import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.view.Menu;
import android.widget.Toast;

public class FimActivity extends Activity {

	private BdAdapter datasource;
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_fim);
		
		datasource = new BdAdapter(this);
		datasource.open();
		Cursor cursor = datasource.getQuestoes();
		String str = "Enunciado: "+ cursor.getString(1) + " | Resposta: " + cursor.getString(2);
		datasource.close();
		Toast.makeText(this, str, Toast.LENGTH_SHORT).show();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.fim, menu);
		return true;
	}

}
